@ECHO off
TITLE Extracting LZO source code...
cls

SET SOURCE="%1"

IF %SOURCE%=="" GOTO ErrorNoParams

IF NOT EXIST %SOURCE% GOTO ErrorInvalidParam

IF NOT EXIST %SOURCE%\lzotest GOTO ErrorNotLZOFolder

xcopy %SOURCE%\include\lzo\*.h ..\WaveAccess.LZONet\LZOInclude\lzo\ /Y
xcopy %SOURCE%\src\*.*h ..\WaveAccess.LZONet\LZOInclude\ /Y
xcopy %SOURCE%\src\*.c ..\WaveAccess.LZONet\LZOSrc\ /Y

GOTO Exit

:ErrorNoParams
ECHO No input folder scecified. Press any key...
pause>nul

:ErrorInvalidParam
ECHO %SOURCE% does not exist. Press any key...
pause>nul

:ErrorNotLZOFolder
ECHO %SOURCE% seems to be not an LZO source folder. Press any key...
pause>nul

:Exit
ECHO Import completed successfully. Press any key...
pause>nul